﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using DG.Tweening;

public class Level1000kg2 : MonoBehaviour
{
    public GameObject line1;
    public GameObject line2;
    public GameLevelItem gameLevelItem;


    public void LineMove()
    {
        Invoke("FinalLineMove", 0.5f);
    }

    private void FinalLineMove()
    {
        line1.transform.DOLocalMoveY(line1.transform.localPosition.y - 1000, 2);
        line2.transform.DOLocalMoveY(line2.transform.localPosition.y + 1000, 2);
        Invoke("TriggerResult", 2.5f);
    }

    private void TriggerResult()
    {
        gameLevelItem.TriggerResult(true);
    }
}
